<template>
	<view class="search-box">
		<view class="search-box-title">{{title}}</view>
		<view class="search-history">
			<view v-for="(item,index) in list" class="search-box-list">{{item.name}}</view>
		</view>
	</view>
</template>

<script setup>
	import {defineProps} from "vue"
	const props=defineProps({
		title:{
			type:String,
			default:"搜索历史"
		},
		list:{
			type:Array,
			default:[{name:"元宇宙"},{name:"数据"},{name:"国发2号文"}]
		}
	})
</script>

<style scoped lang="less">
.search-box{
	.search-box-title{
		font-size: 1.4rem;
	}
	.search-history{
		display: flex;
		justify-content: space-around;
	}
	.search-history{
		width: 100%;
	.search-box-list{
		margin: 1rem;
	}	
	}
}
</style>